
import 'package:flutter/material.dart';

import '../../../utils/Settings.dart';

class MultiCascaderChcekPage extends StatefulWidget{
  const MultiCascaderChcekPage({super.key, required this.options, required this.checkVals, required this.index});
  final List options;
  final Map checkVals;
  final int index;

  @override
  State<MultiCascaderChcekPage> createState() =>MultiCascaderChcekState();

}

class MultiCascaderChcekState extends State<MultiCascaderChcekPage> with AutomaticKeepAliveClientMixin{

  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  bool get wantKeepAlive => true;

  ///开始自定义业务





  @override
  Widget build(BuildContext context) {
    super.build(context);
    return Checkbox(
      activeColor: Settings.primaryColor,
      side: const BorderSide(color: Color.fromRGBO(194, 194, 194, 1)),
      value: widget.checkVals[widget.options[widget.index]["value"]],
      onChanged: (v){
        widget.checkVals[widget.options[widget.index]["value"]]=v;
        setState(() {});
      },
    );
  }

}